home *** CD-ROM | disk | FTP | other *** search
/ PCMania 64 / PCMania CD64_1.iso / phy / phy006 / lowlevel / inicrcom.asm next >
Encoding:
Assembly Source File  |  1997-08-22  |  2.5 KB  |  84 lines

  1. .model tiny
  2. locals
  3. .386
  4. .code
  5.  
  6.                 org     100h
  7.  
  8. Main                    proc
  9.                         push    di
  10.                         mov     di, offset RegAX
  11.                         call    Ponlo
  12.                         mov     ax, bx
  13.                         mov     di, offset RegBX
  14.                         call    Ponlo
  15.                         mov     ax, cx
  16.                         mov     di, offset RegCX
  17.                         call    Ponlo
  18.                         mov     ax, dx
  19.                         mov     di, offset RegDX
  20.                         call    Ponlo
  21.                         mov     ax, si
  22.                         mov     di, offset RegSI
  23.                         call    Ponlo
  24.                         pop     di
  25.                         mov     ax, di
  26.                         mov     di, offset RegDI
  27.                         call    Ponlo
  28.                         mov     ax, bp
  29.                         mov     di, offset RegBP
  30.                         call    Ponlo
  31.                         mov     ah, 09
  32.                         mov     dx, offset Mensaje
  33.                         int     21h
  34.                         ret
  35. Main                    endp
  36.  
  37. Ponlo                   proc
  38.                         mov     byte ptr [control], 0
  39.                         jmp     Salto
  40.            Salto2:      mov     byte ptr [control], 1
  41.            Salto:       push    ax
  42.                         mov     al, ah
  43.                         and     ax, 0f00fh
  44.                         shr     ah, 4
  45.                         xchg    ah, al
  46.                         add     al, 30h
  47.                         cmp     al, 39h
  48.                         jbe     Salto3
  49.                         add     al, 7
  50.           Salto3:       stosb
  51.                         xchg    ah, al
  52.                         add     al, 30h
  53.                         cmp     al, 39h
  54.                         jbe     Salto4
  55.                         add     al, 7
  56.           Salto4:       stosb
  57.                         pop     ax
  58.                         cmp     byte ptr [control], 1
  59.                         jz      Acaba
  60.                         xchg    ah, al
  61.                         jmp     Salto2
  62.             Acaba:      ret
  63. Ponlo                   endp
  64.  
  65. Control db      0
  66.  
  67. Mensaje db 'AX='
  68. RegAX   dd 0
  69.         db ' BX='
  70. RegBX   dd 0
  71.         db ' CX='
  72. RegCX   dd 0
  73.         db ' DX='
  74. RegDX   dd 0
  75.         db ' SI='
  76. RegSI   dd 0
  77.         db ' DI='
  78. RegDI   dd 0
  79.         db ' BP='
  80. RegBP   dd 0
  81.         db '$'
  82.  
  83.                         end     Main
  84.